package ch03.tist;

import ch03.Design.SimpleDaoFactory;
import ch03.dao.NewsDao;
import ch03.jopo.News;
import ch03.service.NewsServiceImpl;

public class Test1 {
    public static void main(String[] args) {
        NewsDao dao = SimpleDaoFactory.getInstance("mysql");
        NewsServiceImpl service = new NewsServiceImpl();
        service.setDao(dao);
        service.save(new News());
    }
}
